home *** CD-ROM | disk | FTP | other *** search
- Path: stdc.demon.co.uk!clive
- From: clive@stdc.demon.co.uk (Clive D.W. Feather)
- Newsgroups: comp.std.c
- Subject: Re: int's and zero
- Date: Thu, 11 Jan 1996 00:03:42 GMT
- Organization: Demon Internet Limited (personal account)
- Message-ID: <DKzpI8.8Kx@stdc.demon.co.uk>
- References: <4cth4e$4q@odin.funcom.no> <4cub1a$jbl@alterdial.UU.NET> <4d12qv$fir@natasha.rmii.com>
- Reply-To: clive@demon.net
- X-NNTP-Posting-Host: stdc.demon.co.uk
-
- In article <4d12qv$fir@natasha.rmii.com>,
- Jerry Coffin <jcoffin@rmii.com> wrote:
- > Yes -- in one's complement, `-0' is represented with all bits set to 1.
- > With one's complement, the usual method of testing for 0 is something
- > like: `if (x+0 == 0)' since the addition of 0 normally produces a
- > positive 0.
-
- The C Standard requires +0 and -0 to compare equal to each other.
-
- --
- Clive D.W. Feather | If you lie to the compiler,
- clive@demon.net (work, preferred) | it will get its revenge.
- clive@stdc.demon.co.uk (home) | - Henry Spencer
-